
<%@ page import="java.util.List" %>
<%@ page import="cn.NewsDao.NewsDao1" %>
<%@ page import="cn.NewsDaoImpl.NewsDaoImpl1" %>
<%@ page import="cn.entity.News1" %><%--
  Created by IntelliJ IDEA.
  User: 31052
  Date: 2022/4/7
  Time: 14:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%
            NewsDao1 newsDao1 = new NewsDaoImpl1();
            List<News1> newsList2 =newsDao1.getNewsList();

        %>
        <div>
            <table>
                <%
                    for (int i=0;i<newsList2.size();i++) {
                %>
                <tr>
                    <td>
                        <%=newsList2.get(i).getId()%>
                    </td>
                    <td>
                        <%=newsList2.get(i).getCategoryId()%>
                    </td>
                    <td>
                        <%=newsList2.get(i).getTitle()%>
                    </td>
                    <td>
                        <%=newsList2.get(i).getPicPath()%>
                    </td>

                    <td>
                        <img src="<%="http://localhost:8080/img/"+newsList2.get(i).getPicPath()%>">
                    </td>
                    <td><a href="UpdateManege3.jsp?newsid=<%=newsList2.get(i).getId()%>">修改</a></td>
                </tr>
                <%
                    }
                %>
            </table>
        </div>
</body>
</html>
